﻿using System;
using System.Collections.Generic;
using Assist;

namespace YJKLevelRelated
{
	public class LevelsDataComparer : IComparer<LevelsDataSource>
	{
		int IComparer<LevelsDataSource>.Compare(LevelsDataSource first, LevelsDataSource second)
		{
			if (GeoUtil.IsEqual(first.Elevation, second.Elevation))
			{
				return 0;
			}
			if (first.Elevation <= second.Elevation)
			{
				return 1;
			}
			return -1;
		}
	}
}
